package com.fgba.express.data.search;

import com.fgba.express.comm.enums.State;
import com.fgba.express.core.search.BaseSearch;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * <p>
 * 用户查询
 * </p>
 *
 * @author fgba
 * @since 2022-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "UserSearch对象", description = "用户查询")
public class UserSearch extends BaseSearch {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "出生日期开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthdayStart;

    @ApiModelProperty(value = "出生日期结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthdayEnd;

    /**
     * 状态，0为删除，1为正常，2为禁用
     */
    @ApiModelProperty(value = "状态")
    private State state;
}
